<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
    

    
<!-- Tencent Speed -->
<script>var _speedMark = new Date()</script>
<!-- End Tencent Speed -->
<!-- Tencent Analysis -->
<script async src="//tajs.qq.com/stats?sId=false."></script>
<!-- End Tencent Analysis -->


    



    <meta charset="utf-8">
    
    
    <meta name="google-site-verification" content="CUm1VNyzpZuuHWWTWLOVfbkoMiz6Q9ccqUY5rMp9vcI">

    
    
    <title>周阳-阳哥JVM部分 | Edward</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="jvm">
    <meta name="description" content="JVM 熟悉JVM架构与GC垃圾回收机制以及相应的堆参调优，有过在linux进行系统调优的经验  一、JVM组成结构谈谈                                                                                                           JVM是运行在操作系统之上的，他与硬件没有直接的交互。 二、JVM">
<meta name="keywords" content="jvm">
<meta property="og:type" content="article">
<meta property="og:title" content="周阳-阳哥JVM部分">
<meta property="og:url" content="http://springcloud.xn--ses554g/2020/04/13/JVM/index.html">
<meta property="og:site_name" content="Edward">
<meta property="og:description" content="JVM 熟悉JVM架构与GC垃圾回收机制以及相应的堆参调优，有过在linux进行系统调优的经验  一、JVM组成结构谈谈                                                                                                           JVM是运行在操作系统之上的，他与硬件没有直接的交互。 二、JVM">
<meta property="og:locale" content="default">
<meta property="og:image" content="http://springcloud.xn--ses554g/img/1559219896(1).jpg">
<meta property="og:image" content="http://springcloud.xn--ses554g/img/1559220033(1).jpg">
<meta property="og:image" content="http://springcloud.xn--ses554g/img/1559224045(1).jpg">
<meta property="og:image" content="http://springcloud.xn--ses554g/img/1559225752(1).jpg">
<meta property="og:image" content="http://springcloud.xn--ses554g/img/1559229663(1).jpg">
<meta property="og:image" content="http://springcloud.xn--ses554g/img/1559229721(1).jpg">
<meta property="og:updated_time" content="2020-04-13T08:42:24.553Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="周阳-阳哥JVM部分">
<meta name="twitter:description" content="JVM 熟悉JVM架构与GC垃圾回收机制以及相应的堆参调优，有过在linux进行系统调优的经验  一、JVM组成结构谈谈                                                                                                           JVM是运行在操作系统之上的，他与硬件没有直接的交互。 二、JVM">
<meta name="twitter:image" content="http://springcloud.xn--ses554g/img/1559219896(1).jpg">
    
        <link rel="alternate" type="application/atom+xml" title="Edward" href="/atom.xml">
    
    <link rel="shortcut icon" href="/img/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

    <script>
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https'){
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else{
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
    </script>

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu">
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand" style="padding-top: 30%;">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/123.png">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">Edward</h5>
          <a href="mailto:zqmssbd@qq.com" title="zqmssbd@qq.com" class="mail">zqmssbd@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/">
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
          
            <li class="waves-block waves-effect">
              <a href="/archives">
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
          
            <li class="waves-block waves-effect">
              <a href="/tags">
                <i class="icon icon-lg icon-tags"></i>
                Tags
              </a>
            </li>
          
            <li class="waves-block waves-effect">
              <a href="/categories">
                <i class="icon icon-lg icon-th-list"></i>
                Categories
              </a>
            </li>
          
            <li class="waves-block waves-effect">
              <a href="https://github.com/zqmssbd" target="_blank">
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
          
            <li class="waves-block waves-effect">
              <a href="https://weibo.com/5333276247" target="_blank">
                <i class="icon icon-lg icon-weibo"></i>
                Weibo
              </a>
            </li>
          
            <li class="waves-block waves-effect">
              <a href="https://gitee.com/Edward-Z" target="_blank">
                <i class="icon icon-lg icon-link"></i>
                码云
              </a>
            </li>
          
      </ul>
        <div id="tp-weather-widget"></div>
        <script>
            (function(a,h,g,f,e,d,c,b){b=function(){d=h.createElement(g);c=h.getElementsByTagName(g)[0];d.src=e;d.charset="utf-8";d.async=1;c.parentNode.insertBefore(d,c)};a["SeniverseWeatherWidgetObject"]=f;a[f]||(a[f]=function(){(a[f].q=a[f].q||[]).push(arguments)});a[f].l=+new Date();if(a.attachEvent){a.attachEvent("onload",b)}else{a.addEventListener("load",b,false)}}(window,document,"script","SeniverseWeatherWidget","//cdn.sencdn.com/widget2/static/js/bundle.js?t="+parseInt((new Date().getTime() / 100000000).toString(),10)));
            window.SeniverseWeatherWidget('show', {
                flavor: "bubble",
                location: "WT3Q0FW9ZJ3Q",
                geolocation: true,
                language: "zh-Hans",
                unit: "c",
                theme: "auto",
                token: "74eabe8a-0b6b-4a56-86ac-c773a4d98218",
                hover: "enabled",
                container: "tp-weather-widget"
            })
        </script>

        <link rel="stylesheet" href="/css/APlayer.css">
        <div id="player" class="aplayer aplayer-withlist aplayer-fixed" data-id="3895885" data-server="netease" data-type="playlist" data-order="random" data-fixed="true" data-listfolded="false" data-theme="#2D8CF0"></div>
        <script src="/js/APlayer.min.js"></script>
        <script src="/js/Meting.min.js"></script>

        


        

    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">周阳-阳哥JVM部分</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">周阳-阳哥JVM部分</h1>
        <h5 class="title">你真的还不够，不够勤奋和努力。</h5>
        <h5 class="subtitle">
            
                <time datetime="2020-04-13T02:24:03.000Z" itemprop="datePublished" class="page-time">
  2020-04-13
</time>


	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/jvm/">jvm</a></li></ul>

            
        </h5>
    </div>

    

    <script>
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https'){
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else{
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
    </script>
</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap post-toc-shrink" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#JVM"><span class="post-toc-number">1.</span> <span class="post-toc-text">JVM</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#一、JVM组成结构谈谈"><span class="post-toc-number">1.1.</span> <span class="post-toc-text">一、JVM组成结构谈谈</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#二、JVM体系结构概览"><span class="post-toc-number">1.2.</span> <span class="post-toc-text">二、JVM体系结构概览</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#三、栈（Stak）"><span class="post-toc-number">1.3.</span> <span class="post-toc-text">三、栈（Stak）</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#3-1-栈存储什么"><span class="post-toc-number">1.3.1.</span> <span class="post-toc-text">3.1 栈存储什么</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#3-2-栈运行原理"><span class="post-toc-number">1.3.2.</span> <span class="post-toc-text">3.2 栈运行原理</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#3-3-判断JVM优化是哪里"><span class="post-toc-number">1.3.3.</span> <span class="post-toc-text">3.3 判断JVM优化是哪里</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#3-4-三种JVM"><span class="post-toc-number">1.3.4.</span> <span class="post-toc-text">3.4 三种JVM</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#四、堆（Heap）"><span class="post-toc-number">1.4.</span> <span class="post-toc-text">四、堆（Heap）</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#4-1-堆内存示意图"><span class="post-toc-number">1.4.1.</span> <span class="post-toc-text">4.1 堆内存示意图</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#4-2-新生区"><span class="post-toc-number">1.4.2.</span> <span class="post-toc-text">4.2 新生区</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#4-3-养老区"><span class="post-toc-number">1.4.3.</span> <span class="post-toc-text">4.3 养老区</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#4-4-永久区"><span class="post-toc-number">1.4.4.</span> <span class="post-toc-text">4.4 永久区</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#4-5-小总结"><span class="post-toc-number">1.4.5.</span> <span class="post-toc-text">4.5 小总结</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#五、JVM垃圾收集（Java-Garbage-Collection）"><span class="post-toc-number">1.5.</span> <span class="post-toc-text">五、JVM垃圾收集（Java Garbage Collection）</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#5-1-堆内存调优简介"><span class="post-toc-number">1.5.1.</span> <span class="post-toc-text">5.1 堆内存调优简介</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#七、GC三大算法"><span class="post-toc-number">1.6.</span> <span class="post-toc-text">七、GC三大算法</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#7-1-GC算法总体概述"><span class="post-toc-number">1.6.1.</span> <span class="post-toc-text">7.1 GC算法总体概述</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#7-2-复制算法：MinorGC（普通GC"><span class="post-toc-number">1.6.2.</span> <span class="post-toc-text">7.2 复制算法：MinorGC（普通GC)</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#7-2-1-原理"><span class="post-toc-number">1.6.2.1.</span> <span class="post-toc-text">7.2.1 原理</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#7-2-2-解释"><span class="post-toc-number">1.6.2.2.</span> <span class="post-toc-text">7.2.2 解释</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#7-3-3-劣势"><span class="post-toc-number">1.6.2.3.</span> <span class="post-toc-text">7.3.3 劣势</span></a></li></ol></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#7-3-标记清除-标记整理算法：FullGC又叫MajorGC（全局GC"><span class="post-toc-number">1.6.3.</span> <span class="post-toc-text">7.3 标记清除/标记整理算法：FullGC又叫MajorGC（全局GC)</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#7-3-1-标记清除（Mark-Sweep"><span class="post-toc-number">1.6.3.1.</span> <span class="post-toc-text">7.3.1 标记清除（Mark-Sweep)</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#7-3-1-1-原理"><span class="post-toc-number">1.6.3.1.1.</span> <span class="post-toc-text">7.3.1.1 原理</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#7-3-1-2-劣势"><span class="post-toc-number">1.6.3.1.2.</span> <span class="post-toc-text">7.3.1.2 劣势</span></a></li></ol></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#7-3-2-标记整理（Mark-Compact"><span class="post-toc-number">1.6.3.2.</span> <span class="post-toc-text">7.3.2 标记整理（Mark-Compact)</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#7-3-2-1-原理"><span class="post-toc-number">1.6.3.2.1.</span> <span class="post-toc-text">7.3.2.1 原理</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#7-3-2-2-劣势"><span class="post-toc-number">1.6.3.2.2.</span> <span class="post-toc-text">7.3.2.2 劣势</span></a></li></ol></li></ol></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#7-4-小总结"><span class="post-toc-number">1.6.4.</span> <span class="post-toc-text">7.4 小总结</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#六、GC面试题"><span class="post-toc-number">1.7.</span> <span class="post-toc-text">六、GC面试题</span></a></li></ol></li></ol>
            <!--<div id="toc" class="toc-article">-->
                <!--<strong class="toc-title">文章目录</strong>-->
                <!--<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#JVM"><span class="toc-number">1.</span> <span class="toc-text">JVM</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#一、JVM组成结构谈谈"><span class="toc-number">1.1.</span> <span class="toc-text">一、JVM组成结构谈谈</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#二、JVM体系结构概览"><span class="toc-number">1.2.</span> <span class="toc-text">二、JVM体系结构概览</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#三、栈（Stak）"><span class="toc-number">1.3.</span> <span class="toc-text">三、栈（Stak）</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#3-1-栈存储什么"><span class="toc-number">1.3.1.</span> <span class="toc-text">3.1 栈存储什么</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-2-栈运行原理"><span class="toc-number">1.3.2.</span> <span class="toc-text">3.2 栈运行原理</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-3-判断JVM优化是哪里"><span class="toc-number">1.3.3.</span> <span class="toc-text">3.3 判断JVM优化是哪里</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-4-三种JVM"><span class="toc-number">1.3.4.</span> <span class="toc-text">3.4 三种JVM</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#四、堆（Heap）"><span class="toc-number">1.4.</span> <span class="toc-text">四、堆（Heap）</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#4-1-堆内存示意图"><span class="toc-number">1.4.1.</span> <span class="toc-text">4.1 堆内存示意图</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-2-新生区"><span class="toc-number">1.4.2.</span> <span class="toc-text">4.2 新生区</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-3-养老区"><span class="toc-number">1.4.3.</span> <span class="toc-text">4.3 养老区</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-4-永久区"><span class="toc-number">1.4.4.</span> <span class="toc-text">4.4 永久区</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-5-小总结"><span class="toc-number">1.4.5.</span> <span class="toc-text">4.5 小总结</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#五、JVM垃圾收集（Java-Garbage-Collection）"><span class="toc-number">1.5.</span> <span class="toc-text">五、JVM垃圾收集（Java Garbage Collection）</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#5-1-堆内存调优简介"><span class="toc-number">1.5.1.</span> <span class="toc-text">5.1 堆内存调优简介</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#七、GC三大算法"><span class="toc-number">1.6.</span> <span class="toc-text">七、GC三大算法</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#7-1-GC算法总体概述"><span class="toc-number">1.6.1.</span> <span class="toc-text">7.1 GC算法总体概述</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-2-复制算法：MinorGC（普通GC"><span class="toc-number">1.6.2.</span> <span class="toc-text">7.2 复制算法：MinorGC（普通GC)</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#7-2-1-原理"><span class="toc-number">1.6.2.1.</span> <span class="toc-text">7.2.1 原理</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-2-2-解释"><span class="toc-number">1.6.2.2.</span> <span class="toc-text">7.2.2 解释</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-3-3-劣势"><span class="toc-number">1.6.2.3.</span> <span class="toc-text">7.3.3 劣势</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-3-标记清除-标记整理算法：FullGC又叫MajorGC（全局GC"><span class="toc-number">1.6.3.</span> <span class="toc-text">7.3 标记清除/标记整理算法：FullGC又叫MajorGC（全局GC)</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#7-3-1-标记清除（Mark-Sweep"><span class="toc-number">1.6.3.1.</span> <span class="toc-text">7.3.1 标记清除（Mark-Sweep)</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#7-3-1-1-原理"><span class="toc-number">1.6.3.1.1.</span> <span class="toc-text">7.3.1.1 原理</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#7-3-1-2-劣势"><span class="toc-number">1.6.3.1.2.</span> <span class="toc-text">7.3.1.2 劣势</span></a></li></ol></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-3-2-标记整理（Mark-Compact"><span class="toc-number">1.6.3.2.</span> <span class="toc-text">7.3.2 标记整理（Mark-Compact)</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#7-3-2-1-原理"><span class="toc-number">1.6.3.2.1.</span> <span class="toc-text">7.3.2.1 原理</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#7-3-2-2-劣势"><span class="toc-number">1.6.3.2.2.</span> <span class="toc-text">7.3.2.2 劣势</span></a></li></ol></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-4-小总结"><span class="toc-number">1.6.4.</span> <span class="toc-text">7.4 小总结</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#六、GC面试题"><span class="toc-number">1.7.</span> <span class="toc-text">六、GC面试题</span></a></li></ol></li></ol>-->
            <!--</div>-->
        </nav>
    </aside>




<article id="post-JVM" class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">周阳-阳哥JVM部分</h1>
        <div class="post-meta">
            <time class="post-time" title="2020-04-13 10:24:03" datetime="2020-04-13T02:24:03.000Z" itemprop="datePublished">2020-04-13</time>

            
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/jvm/">jvm</a></li></ul>



            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style="display:none">
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h1 id="JVM"><a href="#JVM" class="headerlink" title="JVM"></a>JVM</h1><blockquote>
<p>熟悉JVM架构与GC垃圾回收机制以及相应的堆参调优，有过在linux进行系统调优的经验</p>
</blockquote>
<h2 id="一、JVM组成结构谈谈"><a href="#一、JVM组成结构谈谈" class="headerlink" title="一、JVM组成结构谈谈"></a>一、JVM组成结构谈谈</h2><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/img/1559219896(1).jpg" alt="" title="">
                </div>
                <div class="image-caption"></div>
            </figure>
<p>JVM是运行在操作系统之上的，他与硬件没有直接的交互。</p>
<h2 id="二、JVM体系结构概览"><a href="#二、JVM体系结构概览" class="headerlink" title="二、JVM体系结构概览"></a>二、JVM体系结构概览</h2><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/img/1559220033(1).jpg" alt="" title="">
                </div>
                <div class="image-caption"></div>
            </figure>
<ol>
<li><p>Class Loader类加载器</p>
<p>负责加载class文件，class文件在文件开头有特定的文件标示，并且ClassLoader只负责class文件的加载，值与他是否可以允许，则由Execution Engine决定</p>
</li>
<li><p>Execution Engine执行引擎 负责解释命令，提交操作系统执行</p>
</li>
<li><p>Native Interface 本地接口</p>
<p>Java语言本身不能对操作系统底层进行访问和操作，但是可以通过JNI接口调用其他语言来实现对底层的访问。</p>
</li>
<li><p>Native Method Stack 本地方法栈</p>
<p>java在内存中专门开辟了一块区域处理标记为native的代码，他的具体做法是Native Method Stack中登记native方法，在Execution Engine执行时加载native libraies。</p>
</li>
<li><p>Runtime Data Area 运行数据区</p>
</li>
<li><p>Method Area方法区</p>
<p>方法去是被所有线程共享，所有字段和方法字节码、以及一些特殊方法如构造函数，接口代码也在此定义。简单说，所有定义的方法的信息都保存在该区域，==此区属于共享区间==。用来保存装载的类的元结构信息。</p>
<p>==静态变量+常量+类信息+运行时常量池存放在<strong>方法区</strong>==</p>
<p>==实例变量存在<strong>堆内存</strong>中==</p>
</li>
<li><p>PC Register 程序计数器</p>
<p>每个线程都有一个程序计数器，就是一个指针，指向方法区中的方法字节码（下一个将要执行的指令代码），有执行引擎读取下一条指令，是一个非常小的内存空间，可以忽略不记</p>
<p><strong>==栈管运行，堆管存储==</strong></p>
</li>
<li><p><strong>Java Stack 栈</strong></p>
<p>栈也叫栈内存，主管Java程序的运行，是在线程创建时创建，它的生命期是跟随线程的生命期，线程结束栈内存也就释放，<strong>对于栈来说不存在垃圾回收问题</strong>，只要线程一结束该栈就Over，生命周期和线程一致，是线程私有的。<strong>基本类型的变量、实例方法、引用类型变量都是在函数的栈内存中分配</strong></p>
</li>
</ol>
<blockquote>
<p><strong>栈管运行，堆管存储</strong></p>
</blockquote>
<h2 id="三、栈（Stak）"><a href="#三、栈（Stak）" class="headerlink" title="三、栈（Stak）"></a>三、栈（Stak）</h2><p>栈也叫栈内存，主管Java程序的运行，是在线程创建时创建，它的生命期是跟随线程的生命期，线程结束栈内存也就释放，<strong>对于栈来说不存在垃圾回收问题</strong>，只要线程一结束该栈就Over，生命周期和线程一致，是线程私有的。<strong>基本类型的变量、实例方法、引用类型变量都是在函数的栈内存中分配</strong></p>
<h3 id="3-1-栈存储什么"><a href="#3-1-栈存储什么" class="headerlink" title="3.1 栈存储什么"></a>3.1 栈存储什么</h3><p><strong>先进后出，后进先出即为栈</strong></p>
<p>栈帧中主要保存3类数据</p>
<ul>
<li>本地变量（Local Variables）：输入参数和输出参数以及方法内的变量；</li>
<li>栈操作（Operand Stack）：记录出栈、入栈的操作；</li>
<li>栈帧数据（Frame Data）：包括类文件、方法等。</li>
</ul>
<h3 id="3-2-栈运行原理"><a href="#3-2-栈运行原理" class="headerlink" title="3.2 栈运行原理"></a>3.2 栈运行原理</h3><p>栈中的数据都是以栈帧（Stack Frame）的格式存在，栈帧是一个内存去块，是一个数据集，是一个有关方法（Method）和运行期数据的数据集，</p>
<p>当一个方法A被调用时就产生一个栈帧F1，并被压入到栈中，</p>
<p>A方法调用了B方法，于是产生栈帧F2也被压入到栈，</p>
<p>B方法调用了C方法，于是产生栈帧F3也被压入到栈。。。</p>
<p>执行完毕后，先弹出F3，再弹出F2，再弹出F1.。。。</p>
<p>遵循“先进后出/后进先出”的原则。</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/img/1559224045(1).jpg" alt="" title="">
                </div>
                <div class="image-caption"></div>
            </figure>
<p>图示在一个栈中有两个栈：</p>
<p>栈2是最先被调用的方法，先入栈，</p>
<p>然后方法2调用了方法1，栈帧1处于栈顶的位置，</p>
<p>栈帧2处于栈底，执行完毕后，依次弹出栈帧1和栈帧2，</p>
<p>线程结束，栈释放。</p>
<p><strong>每执行一个方法都会产生一个栈帧，保存到栈（后进先出）的顶部，顶部栈就是当前的方法，该方法执行完毕后会自动将此栈帧出栈。</strong></p>
<h3 id="3-3-判断JVM优化是哪里"><a href="#3-3-判断JVM优化是哪里" class="headerlink" title="3.3 判断JVM优化是哪里"></a>3.3 判断JVM优化是哪里</h3><p>主要时优化堆</p>
<h3 id="3-4-三种JVM"><a href="#3-4-三种JVM" class="headerlink" title="3.4 三种JVM"></a>3.4 三种JVM</h3><ol>
<li>Sun公司的HotSpot</li>
<li>BEA公司的JRockit</li>
<li>IBM公司的 J9 VM</li>
</ol>
<h2 id="四、堆（Heap）"><a href="#四、堆（Heap）" class="headerlink" title="四、堆（Heap）"></a>四、堆（Heap）</h2><h3 id="4-1-堆内存示意图"><a href="#4-1-堆内存示意图" class="headerlink" title="4.1 堆内存示意图"></a>4.1 堆内存示意图</h3><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/img/1559225752(1).jpg" alt="堆内存示意图" title="">
                </div>
                <div class="image-caption">堆内存示意图</div>
            </figure>
<h3 id="4-2-新生区"><a href="#4-2-新生区" class="headerlink" title="4.2 新生区"></a>4.2 新生区</h3><p>新生区是类的诞生、成长、消亡的区域，一个类再这里产生，应用，最后被垃圾回收器收集，结束生命。新生去又分欸两部分：伊甸区（Eden Space）和幸存者区（Survivor Space），所有的类都是再伊甸区被new出来。幸存区又连个：0区和1区。当伊甸园的空间用完是，程序有需要创建对象，JVM的垃圾回收器将对伊甸园区进行垃圾回收（Minor GC），将伊甸园区中的不再被其他对象所引用的对象进行销毁。然后将伊甸园区中的生于对象移动到幸存0区，若幸存0区也满了，再对该区进行垃圾回收，然后移动到1区。如果1区也满了，再移动到养老区。若养老区也满了，那么这时候将产生MajorGC（FullGC），进行养老区的内存清理。若养老区执行了FullGC后发现依然无法进行对象保存，就会产生OOM异常（OutOfMemoryError）。</p>
<ul>
<li><p>如果出现<code>java.lang.OutOfMemoryError:Java heap space</code>异常，说明java虚拟机的堆内存不够。原因有二：</p>
<ol>
<li><p>Java虚拟机的对内存设置不够，可以通过参数-Xms、-Xmx来调整</p>
<p>默认最大内存是机器的四分之一大小</p>
</li>
<li><p>代码中创建了大量大对象，并且长时间不能被垃圾收集器收集（存在被引用）</p>
</li>
</ol>
</li>
</ul>
<p><strong>==JDK1.8之后，永久代取消了，由元空间取代==</strong></p>
<h3 id="4-3-养老区"><a href="#4-3-养老区" class="headerlink" title="4.3 养老区"></a>4.3 养老区</h3><p>养老区用于保存从新生区筛选出来的JAVA对象，一般池对象都在这个区域活跃。</p>
<h3 id="4-4-永久区"><a href="#4-4-永久区" class="headerlink" title="4.4 永久区"></a>4.4 永久区</h3><p>永久存储区是一个常驻内存区域，用于存放JDK滋生所携带的Class，Interface的元数据，也就是说它存储的是运行环境必须的类信息，被装载进此区域的数据是不会被垃圾回收器回收掉的，关闭JVM才会释放此区域所占用的内存。</p>
<ul>
<li>如果出现<code>java.lang.OutOfMemoryError:PermGen space</code>，说明是Java虚拟机对永久带Perm内存设置不够，一般出现这种情况，都是程序启动需要加载大量的第三方jar包。例如在一个Tomcat下部署了太多的应用。或者大量动态反射生成的类不断被加载，最终导致Perm区被沾满。<ul>
<li>Jdk1.6之前：有永久代，常量值1.6在方法区</li>
<li>Jdk1.7：有永久代，但已经逐步“去永久代”，常量池1.7在堆</li>
<li>Jdk1.8之后：无永久代，常量池1.8在元空间</li>
</ul>
</li>
</ul>
<h3 id="4-5-小总结"><a href="#4-5-小总结" class="headerlink" title="4.5 小总结"></a>4.5 小总结</h3><p>逻辑上堆由新生代、养老代、元空间构成、实际上堆只有新生和养老代；方法区就是永久代，永久代是方法区的实现</p>
<ul>
<li>方法去（Method Area）和堆一样，是各个线程共享的内存区域，它用于存储虚拟机加载的类信息、普通常量、静态常量、编译器编译后的代码等，虽然JVM规范将方法去描述为堆的一个逻辑部分，但他却还有一个别名叫做Non-Heap（非堆），目的就是要和堆分开。</li>
<li>对于HotSpot虚拟机，很多开发者习惯将方法区成为“永久代”，但严格本质上说两者不同，或者说使用永久代来实现方法区而已，永久代是方法区（相当于一个接口Interface）的一个实现，JDK1.7的版本中，已经将原本放在永久代的字符串常量池移走。</li>
<li>常量池（Constant Pool）是方法区的一部分，Class文件除了有类的版本、字段、方法、接口等描述信息外，还有一项信息就是常量池，这部分内容将在类加载后进入方法区的运行时常量池中存放</li>
</ul>
<h2 id="五、JVM垃圾收集（Java-Garbage-Collection）"><a href="#五、JVM垃圾收集（Java-Garbage-Collection）" class="headerlink" title="五、JVM垃圾收集（Java Garbage Collection）"></a>五、JVM垃圾收集（Java Garbage Collection）</h2><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/img/1559229663(1).jpg" alt="" title="">
                </div>
                <div class="image-caption"></div>
            </figure>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/img/1559229721(1).jpg" alt="" title="">
                </div>
                <div class="image-caption"></div>
            </figure>
<h3 id="5-1-堆内存调优简介"><a href="#5-1-堆内存调优简介" class="headerlink" title="5.1 堆内存调优简介"></a>5.1 堆内存调优简介</h3><table>
<thead>
<tr>
<th>-Xms</th>
<th>设置初始分配大小，默认为物理内存的“1/64”</th>
</tr>
</thead>
<tbody>
<tr>
<td>-Xmx</td>
<td>最大分配内存，默认为物理内存的“1/4”</td>
</tr>
<tr>
<td>-XX:+PrintGCDetails</td>
<td>输出详细的GC处理日志</td>
</tr>
</tbody>
</table>
<h2 id="七、GC三大算法"><a href="#七、GC三大算法" class="headerlink" title="七、GC三大算法"></a>七、GC三大算法</h2><h3 id="7-1-GC算法总体概述"><a href="#7-1-GC算法总体概述" class="headerlink" title="7.1 GC算法总体概述"></a>7.1 GC算法总体概述</h3><p>JVM在进行GC时，并非每次都对上面三个内存区域一起回收的，大部分时候回收的都是指新生代。</p>
<p>因此GC按照回收的区域又分了两种类型，一种是普通GC（MinorGC），一种时全局GC（FullGC）</p>
<ul>
<li>普通GC：只针对新生代区域的GC</li>
<li>全局GC：针对年老代的GC，偶尔伴随对新生代的GC以及堆永久代的GC。</li>
</ul>
<h3 id="7-2-复制算法：MinorGC（普通GC"><a href="#7-2-复制算法：MinorGC（普通GC" class="headerlink" title="7.2 复制算法：MinorGC（普通GC)"></a>7.2 复制算法：MinorGC（普通GC)</h3><p>新生代使用的MinorGC，这种GC算法采用的是复制算法（Copying），频繁使用</p>
<p>复制–&gt;清空–&gt;互换</p>
<h4 id="7-2-1-原理"><a href="#7-2-1-原理" class="headerlink" title="7.2.1 原理"></a>7.2.1 原理</h4><p>MinorGC会把Eden中的所有或的对象都移到Survivor区域中，如果Survivor区中放不下，那么剩下的活的对象就被移到Old Generation中，也即一旦收集后，Eden区就变成空的了。</p>
<p>当对象在Eden（包括一个Survivor区域，这里假设是from区域）出生后，在经过一次MinorGC后，如果对象还存活，并且能够被另外一块Survivor区域所容纳（上面已经假设为from区域，这里应为to区域，即to区域又足够的内存空间来存储Eden和from区域中存活的对象），则使用复制算法将这些仍然还存活的对象复制到另外一块Survivor区域（即to区）中，然后清理所有使用过的Eden以及Survivor区域（即from区），并且讲这些对象的年龄设置为1，以后对象在Survivor区没熬过一次MinorGC，就将对象的年龄+1，当对象的年龄达到某个值时（默认15，通过<code>-XX：MaxTenuringThreshold</code>来设定参数），这些对象就会成为老年代。</p>
<p>==-XX：MaxTenuringThreshold设置对象在新生代中存活的次数==</p>
<h4 id="7-2-2-解释"><a href="#7-2-2-解释" class="headerlink" title="7.2.2 解释"></a>7.2.2 解释</h4><p>HotSpot JVM把年轻代分为了三部分：1个Eden区和两个Survivor区，默认比例是8:1:1，一般情况下，新创建的对象都会被分配到Eden区，这些对象经过第一次的MinorGC后，如果仍然存活，将会被移到Survivor区。对象Survivor区中每熬过一次MinorGC，年龄就增加一岁，当他的年龄增加到一定程度时，就会被移动到年老代中。因为年轻代中的对象基本都是朝生夕死（80%以上），所以在年轻代的垃圾回收算法使用的是复制算法，复制算法的基本思想就是将内存分为两块，每次只用其中一块，当这一块内存用完，就将活着的对象复制到另外一块上面。复制算法不会产生内存碎片。</p>
<p>==复制要交换，谁空谁是to==</p>
<h4 id="7-3-3-劣势"><a href="#7-3-3-劣势" class="headerlink" title="7.3.3 劣势"></a>7.3.3 劣势</h4><p>复制算法弥补了标记清除算法中，内存布局混乱的缺点。</p>
<ol>
<li>浪费了一般的内存，太要命了</li>
<li>如果对象的存活率很高，我们可以极端一点，假设是100%存活率，那么我们需要将所有对象都复制一遍，并将所有引用地址重置一遍。复制这一工作所花费的时间，在对象存活率达到一定程度是，将会变的不可忽视。所以从以上描述不难看出，复制算法想要使用，最起码对象的存活率要非常低才行，而且最重要的是，我们必须要客服50%的内存的浪费</li>
</ol>
<h3 id="7-3-标记清除-标记整理算法：FullGC又叫MajorGC（全局GC"><a href="#7-3-标记清除-标记整理算法：FullGC又叫MajorGC（全局GC" class="headerlink" title="7.3 标记清除/标记整理算法：FullGC又叫MajorGC（全局GC)"></a>7.3 标记清除/标记整理算法：FullGC又叫MajorGC（全局GC)</h3><p>老年代一般是由标记清除或者是标记清除与标记整理的混合实现</p>
<h4 id="7-3-1-标记清除（Mark-Sweep"><a href="#7-3-1-标记清除（Mark-Sweep" class="headerlink" title="7.3.1 标记清除（Mark-Sweep)"></a>7.3.1 标记清除（Mark-Sweep)</h4><h5 id="7-3-1-1-原理"><a href="#7-3-1-1-原理" class="headerlink" title="7.3.1.1 原理"></a>7.3.1.1 原理</h5><ol>
<li><p>标记（mark）</p>
<p>从根集合开始扫描，对存活的对象进行标记</p>
</li>
<li><p>清除（Sweep）</p>
<p>扫描整个内存空间，回收未被标记的对象，使用free-list记录可以区域。</p>
</li>
</ol>
<h5 id="7-3-1-2-劣势"><a href="#7-3-1-2-劣势" class="headerlink" title="7.3.1.2 劣势"></a>7.3.1.2 劣势</h5><ol>
<li>效率低（递归与全堆对象遍历），而且在进行GC的时候，需要停止应用程序，这会导致用户体验非常差劲</li>
<li>清理出来的空闲内存不是连续的，我们的死亡对象都是随机的出现在内存的各个角落，限制把他们清除之后，内存的布局自然会乱七八糟，而为了应付这一点，JVM不得不维持一个内存的空闲列表，这又是一种开销，而且在分配数组对象的时候，寻找连续的内存空间会不太好找。</li>
</ol>
<h4 id="7-3-2-标记整理（Mark-Compact"><a href="#7-3-2-标记整理（Mark-Compact" class="headerlink" title="7.3.2 标记整理（Mark-Compact)"></a>7.3.2 标记整理（Mark-Compact)</h4><h5 id="7-3-2-1-原理"><a href="#7-3-2-1-原理" class="headerlink" title="7.3.2.1 原理"></a>7.3.2.1 原理</h5><ol>
<li><p>标记</p>
<p>与标记-清除一样</p>
</li>
<li><p>压缩整理</p>
<p>再次扫描，并往一段滑动存活对象</p>
</li>
</ol>
<h5 id="7-3-2-2-劣势"><a href="#7-3-2-2-劣势" class="headerlink" title="7.3.2.2 劣势"></a>7.3.2.2 劣势</h5><p>效率不高，不仅要标记所有存活对象，还要整理所有存活对象的引用地址。从效率上说，效率要低于复制算法</p>
<h3 id="7-4-小总结"><a href="#7-4-小总结" class="headerlink" title="7.4 小总结"></a>7.4 小总结</h3><ul>
<li><strong>内存效率</strong>：复制算法&gt;标记清除算法&gt;标记整理算法</li>
<li><strong>内存整齐度</strong>：复制算法=标记整理算法&gt;标记清除算法</li>
<li><strong>内存利用率</strong>：标记整理算法=标记清除算法&gt;复制算法</li>
</ul>
<p>分代收集算法</p>
<p>引用计数法：</p>
<ul>
<li>缺点：每次对对象赋值时均要维护引用计数器，且计数器本身也有一定的消耗</li>
<li>较难处理循环引用</li>
</ul>
<h2 id="六、GC面试题"><a href="#六、GC面试题" class="headerlink" title="六、GC面试题"></a>六、GC面试题</h2><ol>
<li><p>StackOverFlowError和OutOfMemoryError，谈谈你的理解</p>
</li>
<li><p>一般什么时候会发生GC？如何处理？</p>
<p>答：Java中的GC回有两种回收：年轻带的MinorGC，老年代的FullGC；新对象创建时如果伊甸园空间不足会触发MinorGC，如果此时老年代的内存空间不足会触发FullGC，如果空间都不足抛出OutOfMemoryError。</p>
</li>
<li><p>GC回收策略，谈谈你的理解</p>
<p>答：年轻代（伊甸园区+两个幸存区），GC回收策略为“复制”；老年区的保存空间一般比较大，GC回收策略为“整理压缩”。</p>
</li>
<li><p>GC是什么</p>
<p>频繁收集Young区，较少收集Old区，基本不动Perm区</p>
</li>
<li><p>JVM内存模型以及分区，需要详细到每个区放什么</p>
</li>
<li><p>堆里面的分区：Eden,suirival from to,老年代，各自特点</p>
</li>
<li><p>GC的三种收集方法：标记清除、标记整理、复制算法的原理特点</p>
</li>
<li><p>MinorGC和Full GC分别在什么时候发生</p>
</li>
</ol>

        </div>

        <blockquote class="post-copyright">
    
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2020-04-13T08:42:24.553Z" itemprop="dateUpdated">2020-04-13 16:42:24</time>
</span><br>


        
    </div>
    
    <footer>
        <a href="http://springcloud.xn--ses554g">
            <img src="/img/123.png" alt="Edward">
            Edward
        </a>
    </footer>
</blockquote>

        


        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/jvm/">jvm</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://springcloud.xn--ses554g/2020/04/13/JVM/&title=《周阳-阳哥JVM部分》 — Edward&pic=http://springcloud.xn--ses554g/img/123.png" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://springcloud.xn--ses554g/2020/04/13/JVM/&title=《周阳-阳哥JVM部分》 — Edward&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://springcloud.xn--ses554g/2020/04/13/JVM/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《周阳-阳哥JVM部分》 — Edward&url=http://springcloud.xn--ses554g/2020/04/13/JVM/&via=http://springcloud.xn--ses554g" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://springcloud.xn--ses554g/2020/04/13/JVM/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2020/04/13/JVM面试/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">周阳-阳哥JVM面试部分</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2020/04/07/jdk_jvm_juc-learning/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">JUC和JVM</h4>
      </a>
    </div>
  
</nav>



    











    <!-- Valine Comments -->
    <div class="comments vcomment" id="comments"></div>
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script>
    <!-- Valine Comments script -->
    <script>
        var GUEST_INFO = ['nick','mail','link'];
        var guest_info = 'nick,mail,link'.split(',').filter(function(item){
          return GUEST_INFO.indexOf(item) > -1
        });
        new Valine({
            el: '#comments',
            notify: 'false' == 'true',
            verify: 'false' == 'true',
            appId: "NHOU6qcrdobSwD5wwUJJ31pQ-gzGzoHsz",
            appKey: "E0RJgPMPwkjfMBOA88EalSzJ",
            avatar: "mm",
            placeholder: "Just go go",
            guest_info: guest_info.length == 0 ? GUEST_INFO : guest_info,
            pageSize: "10"
        })
    </script>
    <!-- Valine Comments end -->







</article>



</div>

        <footer class="footer">
    <div class="top">
        <p>
    <span id="busuanzi_container_site_uv">
        站点总访客数：30<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv">
        站点总访问量：425<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>Edward &copy; 2017 - 2021</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://springcloud.xn--ses554g/2020/04/13/JVM/&title=《周阳-阳哥JVM部分》 — Edward&pic=http://springcloud.xn--ses554g/img/123.png" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://springcloud.xn--ses554g/2020/04/13/JVM/&title=《周阳-阳哥JVM部分》 — Edward&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://springcloud.xn--ses554g/2020/04/13/JVM/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《周阳-阳哥JVM部分》 — Edward&url=http://springcloud.xn--ses554g/2020/04/13/JVM/&via=http://springcloud.xn--ses554g" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://springcloud.xn--ses554g/2020/04/13/JVM/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>





<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"log":false,"model":{"jsonPath":"/live2dw/assets/hijiki.model.json"},"display":{"position":"right","width":200,"height":400},"mobile":{"show":false}});</script></body>
</html>
